package com.example.demo.quartz.job;

import org.springframework.transaction.annotation.Transactional;

import java.util.Date;

/**
 * @author 张晓
 * @create 2020-12-05 16:00
 */
@Transactional
public class MyJob {

    private String jobName;

    public void execute() {
        System.out.println("-------------------" + jobName + "任务执行开始-------------------");
        System.out.println(new Date());
        System.out.println("-------------------" + jobName + "任务执行结束-------------------");
    }

    public String getJobName() {
        return jobName;
    }

    public void setJobName(String jobName) {
        this.jobName = jobName;
    }
}
